package com.itheima.dao;
/*
* 水仙花
* */
public class For4 {
    public static void main(String[] args) {
        int count=0;
        for (int i = 100; i < 1000; i++) {
            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 10 / 10 % 10;

            //实现两个一行
            if (ge * ge * ge + shi * shi * shi + bai * bai * bai == i) {
                System.out.print(i+" ");
                count++;
                if (count%2==0){
                    System.out.println();
                }
            }
        }
    }
}
